//
//  GrowRecordDetaiCollectionViewCell.m
//  PigMarket
//
//  Created by mac on 2019/7/4.
//  Copyright © 2019 felix.pigmarket.oc. All rights reserved.
//

#import "GrowRecordDetaiCollectionViewCell.h"

@interface GrowRecordDetaiCollectionViewCell ()

@end
@implementation GrowRecordDetaiCollectionViewCell
#pragma mark - init method
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self initView];
        [self initLayout];
    }
    return self;
}

- (void)initView {
    // 添加子控件
    [self.contentView addSubview:self.img];
}

- (void)initLayout {
    // 布局子控件
    [self.img mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.right.bottom.mas_equalTo(0);
    }];
}

#pragma mark - getter and setter
- (UIImageView *)img {
    if (!_img) {
        _img = [[UIImageView alloc] init];
        _img.layer.cornerRadius = 8;
        _img.layer.masksToBounds = YES;
    }
    return _img;
}
@end
